package com.bndg.blackjack

/**
 * @author r
 * @date 2024/10/12
 * @description 游戏状态 两人对战
 */
class GameState  {
    // 是否是联机对局
    var isOnline: Boolean = true
    // 是否连接上服务器
    var isConnected: Boolean = false
    // 玩家和庄家的牌
    var playerCards: MutableList<Card>? = null
    var dealerCards: MutableList<Card>? = null
    // 是否在对局中
    var isPlaying: Boolean = false
    // 玩家和庄家总筹码
    var playerChips: Int = 0
    var dealerChips: Int = 0
    // 玩家下注筹码
    var currentChips: Int = 0
    var currentTurn: Turn = Turn.PLAYER // 初始为PLAYER的回合
    var dealerId: String = ""
    var playerId: String = ""
    var isInviteMsg: Boolean = false // 是否是邀请消息
    var isPlayerAccepted: Boolean = false // PLAYER是否接受邀请
    var isPlayerLeft: Boolean = false // PLAYER是否离开游戏
    var isDealerLeft: Boolean = false // DEALER是否离开游戏
    var gameAction:GameAction? = null
    var gameResult: GameResult? = null // 游戏结果
    // 对局ID
    var gameId: String? = null
}